package com.lichuandi.myspringbootsqlserver.controller;

import com.lichuandi.myspringbootsqlserver.service.WPSPDFlightService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.UUID;

@Controller
public class WPSPDFlightController {
    @Autowired
    private WPSPDFlightService wpspdFlightService;

    @GetMapping("/add")
    public String addFlight(String acCode, String fltNo , String model){
        String id = UUID.randomUUID().toString();
        wpspdFlightService.addFlight(id, acCode,fltNo, model);
        return "success";
    }
}
